package com.formula.propertyshop.service;

import java.util.ArrayList;
import java.util.List;

import android.graphics.Bitmap;

import com.formula.propertyshop.model.Contact;
import com.formula.propertyshop.model.Course;
import com.formula.propertyshop.model.CourseRegisterRequest;
import com.formula.propertyshop.model.Feedback;
import com.formula.propertyshop.model.FeedbackTemplate;
import com.formula.propertyshop.model.GCMRegisterRequest;
import com.formula.propertyshop.model.ListCourse;
import com.formula.propertyshop.model.LoanCalculateRequest;
import com.formula.propertyshop.model.POSTResponse;
import com.formula.propertyshop.model.Property;
import com.formula.propertyshop.model.PropertyDetail;
import com.formula.propertyshop.model.PropertyLocation;
import com.formula.propertyshop.model.PropertyType;
import com.google.android.gms.maps.model.LatLng;

public class DumyService implements IWireFrameService{

	ServiceConfigure config = new ServiceConfigure();
	
	@Override
	public <T> T get(String url, Class type) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public <T> List<T> getList(String url, Class type) {
		if(type.equals(Property.class))
			return (List<T>) getListProperty();
		return null;
	}
	private List<Property>getListProperty(){
		List<Property>list = new ArrayList<Property>();
		for(int i=0;i<10;i++){
			Property p = new Property();
			p.setImgUrl("http://www.sgrealtor.com/wp-content/uploads/2012/11/9-14-jln-riang-215x100.jpg");
			p.setName("4 Ajoint Shophouses");
			///p.setPrice(" S$4,000,000");
			p.setBedrooms("Shophouse | Freehold");
			p.setBathrooms("Residential + Commerical");
			p.setExcerpt("a b fkfj gjkgs gkngk gnfkgnf gngkey eiye ww");
			list.add(p);
		}
		return list;
	}

	@Override
	public List<Property> getProperties(int offset, int page) {
		List<Property>list = new ArrayList<Property>();
		for(int i=0;i<10;i++){
			Property p = new Property();
			p.setImgUrl("http://www.sgrealtor.com/wp-content/uploads/2012/11/9-14-jln-riang-215x100.jpg");
			p.setName("4 Ajoint Shophouses");
			//p.setPrice(" S$4,000,000");
			p.setBedrooms("Shophouse | Freehold");
			p.setBathrooms("Residential + Commerical");
			p.setExcerpt("a b fkfj gjkgs gkngk gnfkgnf gngkey eiye ww");
			list.add(p);
		}
		return list;
	}

	@Override
	public PropertyDetail getProperty(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ListCourse getCourses(int offset, int page) {
		ListCourse listCourse = new ListCourse();
		for (int i=0; i<3;i++) {
			Course c = new Course();
			c.setName("Course_"+i);
			c.setLeft(i);
			c.setPrice(9000);
			c.setDate("32/1/2012");
			//listCourse.getListCourse().add(c);
		}
		return listCourse;
	}

	@Override
	public Course getCourse(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public POSTResponse registerCourse(CourseRegisterRequest course) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public POSTResponse sendContact(Contact contact) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<FeedbackTemplate> getFeedbackTemplate() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public POSTResponse sendFeedback(Feedback feedback) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<PropertyType> getPropertyTypes() {
		List<PropertyType>lst = new ArrayList<PropertyType>();
		for(int i=0;i<5;i++){
			PropertyType type = new PropertyType();
			type.setId(String.valueOf(i));
			type.setValue("Type_"+i);
			lst.add(type);
		}
		return lst;
	}

	@Override
	public List<PropertyLocation> getPropertyLocations() {
		List<PropertyLocation>lst = new ArrayList<PropertyLocation>();
		for(int i=0;i<5;i++){
			PropertyLocation type = new PropertyLocation();
			type.setId(String.valueOf(i));
			type.setName("Location_"+i);
			lst.add(type);
		}
		return lst;
	}

	@Override
	public List<Property> getSearchProperty(String url) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Bitmap calculate(LoanCalculateRequest request) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public LatLng getGoogleLocation(String address)
			throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public POSTResponse registerGCMKey(GCMRegisterRequest request)
			throws Exception {
		// TODO Auto-generated method stub
		return null;
	}
	
}
